package com.vois.jack.btmgr.blebase;

public enum BleDevCommonMsg {
    BLE_DEV_COMMON_KEY_PRESSED_MSG(0x81),
    BLE_DEV_COMMON_KEY_RELEASED_MSG(0x82),
    BLE_DEV_COMMON_KEY_CLICKED_MSG(0x83),
    BLE_DEV_COMMON_VALIDATION_RESULT(0x84),
    BLE_DEV_COMMON_GET_VERSION_RESULT(0x85),
    BLE_DEV_COMMON_GET_VENDOR_RESULT(0x86),
    BLE_DEV_COMMON_SET_SEQID_RESULT(0x87),
    BLE_DEV_COMMON_REQ_CLOSE(0x88),
    BLE_DEV_COMMON_DFU_SET_RESULT(0x89),
    BLE_DEV_COMMON_REQ_RECORDER_STARTED(0x8A),
    BLE_DEV_COMMON_REQ_RECORDER_STOPPED(0x8B),
    BLE_DEV_COMMON_GET_ADDRESS_RESULT(0x8C),
    BLE_DEV_COMMON_GET_RECORD_ABILITY(0x8D),
    BLE_DEV_COMMON_NONE(-1);

    private final int value;

    public int getValue() {
        return value;
    }

    BleDevCommonMsg(int value) {
        this.value = value;
    }

    static public BleDevCommonMsg valueOf(int value) {
        for (BleDevCommonMsg bleDevCommonMsg : BleDevCommonMsg.values()) {
            if (bleDevCommonMsg.getValue() == value) {
                return bleDevCommonMsg;
            }
        }

        return BleDevCommonMsg.BLE_DEV_COMMON_NONE;
    }
}
